import request from '../../utils/request';
const transaction = {
  state: {

  },

  getters: {

  },

  mutations: {

  },

  actions: {
    /** 
     * 交易记录
     * 资金模块-充值消费记录
     * @params payload{
     *   source string  project("公益支付"), recharge("充值支付"), lawyerCase("案件支付");
     *   type   string  in ：收入 ， out：支出
     * }
     * */
    GET_LOG_CAPITAL({ commit }, payload) {
      return new Promise((resolve, reject) => {
        request.post('/capital/getLogCapital.htm', payload).then(res => {
          console.log('res::', res);
          console.log('commit::', commit);
          resolve(res);
        }).catch(err => {
          console.error('err::::', err);
          reject(err);
        })
      });
    },
  }
}

export default transaction